import request from '@/utils/http'
// import qs from 'qs'

export function pageList (params) {
  return request({
    url: '/perceiveTargetManagement/pageList',
    method: 'GET',
    params
  })
}

export function dict (params) {
  return request({
    url: '/commonDataInfo/dict',
    method: 'GET',
    params
  })
}
export function companyInfoList (params) {
  return request({
    url: '/commonDataInfo/list',
    method: 'GET',
    params
  })
}
export function deviceList (params) {
  return request({
    url: '/deviceCommonInfo/list',
    method: 'GET',
    params
  })
}

export function targetDetail (params) {
  return request({
    url: '/perceiveTargetManagement/detail/' + params,
    method: 'GET'
  })
}

export function addForm (params) {
  return request({
    url: '/perceiveTargetManagement/add',
    method: 'POST',
    data: params,
    headers: {
      'Content-Type': 'application/json'
    }
  })
}

export function updateForm (params) {
  return request({
    url: '/perceiveTargetManagement/update',
    method: 'POST',
    data: params,
    headers: {
      'Content-Type': 'application/json'
    }
  })
}

export function deleteTarget (params) {
  return request({
    url: '/perceiveTargetManagement/' + params,
    method: 'DELETE'
  })
}